**Bacchus & Boulding Governance CCES Replication File

use 

**Note, original codings for income and political interest recoded in this file to drop don't know/didn't answer

*** Treatment var: 0=USA, 1=Mexico

*** DV: corruption var - 4-point scale (1 definitely corruption, 2 probably corruption, 3 probably normal politics, 4 definitely normal politics)
**** 4 DVs: perception of corruption about food or favors for votes, personal use of campaign funds, changes in election laws, possible voter intimidation


label define corruption 1 "definitely corruption" 2 "probably corruption" 3 "probably normal politics" 4 "definitely normal politics" 8 "skipped" 9 "not asked"
label define confidence 1 "very confident" 2 "somewhat confident" 3 "not very confident" 4 "not at all confident" 8 "skipped" 9 "not asked" 
label define education 1 "no HS" 2 "high school graduate" 3 "some college" 4 "2-year" 5 "4-year" 6 "post-grad" 8 "skipped" 9 "not asked" 
label define income 1 "<$10k" 2 "$10k-$19,999" 3 "$20k-$29,999" 4 "$30k-$39,000" 5 "40k-$49,999" 6 "$50k-$59,999" 7 "$60k-$69,999" 8 "$70k-$79,999" 9 "$80k-$99,999" 10 "$100k-$119,999" 11 "$120k-$149,999" 12 "$150k-$199,999" 13 "$200K-$249,999" 14 "$250k-$349,999" 15 "$350k-$499,999" 16 "$500k or more" 31 "$150k or more" 32 "$250k or more" 97 "prefer not to say" 98 "skipped" 99 "not asked" 
label define countrytreatment 0 "US" 1 "Mexico" 8 "skipped" 9 "no answer"
label define travel 0 "no" 1 "yes" 8 "skipped" 9 "not asked" 
label define polinterest 1 "most of the time" 2 "some of the time" 3 "only now and then" 4 "hardly at all" 7 "don't know" 8 "skipped" 9 "not asked" 

* DV1
ge corrupt_ff=CUB4CB4A
label var corrupt_ff "Favor or food corruption"
label values corrupt_ff corruption

* DV2
ge corrupt_money=CUB4CB4B  
label var corrupt_money "Campaign money corruption"
label values corrupt_money corruption

* DV3
ge corrupt_elections=CUB4CB4C
label var corrupt_elections "Election law corruption"
label values corrupt_elections corruption

* DV4
ge corrupt_intimidation=CUB4CB5
label var corrupt_intimidation "Voter intimidation during campaign"
label values corrupt_intimidation corruption

* DV5
ge corrupt_vote=CUB4CB6
label var corrupt_vote "How likely to vote in next election given corrupt_intimidation response"
label values corrupt_vote vote 


*** IVs: respondent education, income, political interest, gender, whether they have traveled outside the US, confidence in elections (country specific), interaction of confidence in elections and country treatment

* Respondent education 
label var educ "Level of respondent education"
label values educ education

* Income 
ge income=faminc
label var income "Family income" 
label values income income
replace income=. if income ==19

* Political interest
* newsint: Interest in news and public affairs
ge polinterest=newsint
label var polinterest "Interest in news and public affairs"
label values polinterest polinterest
replace polinterest=. if polinterest==5

* Gender 
ge female=.
replace female=0 if gender==1
replace female=1 if gender==2

* Traveled outside US
ge globaltravel=.
replace globaltravel=0 if CUB4CB1A==2
replace globaltravel=1 if CUB4CB1A ==1
label var globaltravel "Have you ever traveled outside US?"
label values globaltravel travel


* Confidence in elections
ge confidence_elections=CUB4CB3
label var confidence_elections " Confidence in election outcomes in the US" 
label values confidence_elections confidence

* Treatment variables
ge mexicotreatment=.
replace mexicotreatment=1 if CUB4CB3_treat==2
replace mexicotreatment=0 if CUB4CB3_treat==1
label var mexicotreatment "Mexico condition=1, US condition=0"
label values mexicotreatment countrytreatment


********End copied portion

ge corrupt_ffdummy=0
replace corrupt_ffdummy=1 if corrupt_ff==1
replace corrupt_ffdummy=1 if corrupt_ff==2
label var corrupt_ffdummy "=1 if food/favors definitely or probably corruption"

ge corrupt_moneydummy=0
replace corrupt_moneydummy=1 if corrupt_money==1
replace corrupt_moneydummy=1 if corrupt_money==2
label var corrupt_moneydummy "=1 if money use definitely or probably corruption"

ge corrupt_electionsdummy=0
replace corrupt_electionsdummy=1 if corrupt_elections==1
replace corrupt_electionsdummy=1 if corrupt_elections==2
label var corrupt_electionsdummy "=1 if election law change definitely or probably corruption"

ge corrupt_intimidationdummy=0
replace corrupt_intimidationdummy=1 if corrupt_intimidation==1
replace corrupt_intimidationdummy=1 if corrupt_intimidation==2
label var corrupt_intimidationdummy "=1 if intimidation definitely or probably corruption"

gen corrupt_ffdummy2=0
replace corrupt_ffdummy2=1 if corrupt_ff==1
label var corrupt_ffdummy2 "=1 if food/favors definitely corruption"

gen corrupt_moneydummy2=0
replace corrupt_moneydummy2=1 if corrupt_money==1
label var corrupt_moneydummy2 "=1 if money use definitely corruption"

gen corrupt_electionsdummy2=0
replace corrupt_electionsdummy2=1 if corrupt_elections==1
label var corrupt_electionsdummy2 "=1 if election changes definitely corruption"

gen corrupt_intimidationdummy2=0
replace corrupt_intimidationdummy2=1 if corrupt_intimidation==1
label var corrupt_intimidationdummy2 "=1 if intimidation definitely corruption"

**Figure 4 code--generates values to create graph in Excel

tab corrupt_ffdummy mexicotreatment, ro co chi2
**This shows raw proportions
summarize corrupt_ffdummy if mexicotreatment==1
**This provides the same proportion information for Mexico treatment only
ttest corrupt_ffdummy = corrupt_ffdummy if mexicotreatment==1
*** provides the same proportion information plus confidence intervals for Mex
summarize corrupt_ffdummy if mexicotreatment==0
**proportion for US treatment
ttest corrupt_ffdummy = corrupt_ffdummy if mexicotreatment==0
**Proportion wiht CIs for US treatment

tab corrupt_moneydummy mexicotreatment, ro co chi2
**This shows raw proportions
summarize corrupt_moneydummy if mexicotreatment==1
**This provides the same proportion information for Mexico treatment only
ttest corrupt_moneydummy = corrupt_moneydummy if mexicotreatment==1
*** provides the same proportion information plus confidence intervals for Mex
summarize corrupt_moneydummy if mexicotreatment==0
**proportion for US treatment
ttest corrupt_moneydummy = corrupt_moneydummy if mexicotreatment==0
**Proportion wiht CIs for US treatment

tab corrupt_electionsdummy mexicotreatment, ro co chi2
**This shows raw proportions
summarize corrupt_electionsdummy if mexicotreatment==1
**This provides the same proportion information for Mexico treatment only
ttest corrupt_electionsdummy = corrupt_electionsdummy if mexicotreatment==1
*** provides the same proportion information plus confidence intervals for Mex
summarize corrupt_electionsdummy if mexicotreatment==0
**proportion for US treatment
ttest corrupt_electionsdummy = corrupt_electionsdummy if mexicotreatment==0
**Proportion wiht CIs for US treatment

tab corrupt_intimidationdummy mexicotreatment, ro co chi2
**This shows raw proportions
summarize corrupt_intimidationdummy if mexicotreatment==1
**This provides the same proportion information for Mexico treatment only
ttest corrupt_intimidationdummy = corrupt_intimidationdummy if mexicotreatment==1
*** provides the same proportion information plus confidence intervals for Mex
summarize corrupt_intimidationdummy if mexicotreatment==0
**proportion for US treatment
ttest corrupt_intimidationdummy = corrupt_intimidationdummy if mexicotreatment==0
**Proportion wiht CIs for US treatment

**Figure 5 code--generates values to create graph in excel

tab corrupt_ffdummy2 mexicotreatment, ro co chi2
**This shows raw proportions
summarize corrupt_ffdummy2 if mexicotreatment==1
**This provides the same proportion information for Mexico treatment only
ttest corrupt_ffdummy2 = corrupt_ffdummy2 if mexicotreatment==1
*** provides the same proportion information plus confidence intervals for Mex
summarize corrupt_ffdummy2 if mexicotreatment==0
**proportion for US treatment
ttest corrupt_ffdummy2 = corrupt_ffdummy2 if mexicotreatment==0
**Proportion wiht CIs for US treatment

tab corrupt_moneydummy2 mexicotreatment, ro co chi2
**This shows raw proportions
summarize corrupt_moneydummy2 if mexicotreatment==1
**This provides the same proportion information for Mexico treatment only
ttest corrupt_moneydummy2 = corrupt_moneydummy2 if mexicotreatment==1
*** provides the same proportion information plus confidence intervals for Mex
summarize corrupt_moneydummy2 if mexicotreatment==0
**proportion for US treatment
ttest corrupt_moneydummy2 = corrupt_moneydummy2 if mexicotreatment==0
**Proportion wiht CIs for US treatment

tab corrupt_electionsdummy2 mexicotreatment, ro co chi2
**This shows raw proportions
summarize corrupt_electionsdummy2 if mexicotreatment==1
**This provides the same proportion information for Mexico treatment only
ttest corrupt_electionsdummy2 = corrupt_electionsdummy2 if mexicotreatment==1
*** provides the same proportion information plus confidence intervals for Mex
summarize corrupt_electionsdummy2 if mexicotreatment==0
**proportion for US treatment
ttest corrupt_electionsdummy2 = corrupt_electionsdummy2 if mexicotreatment==0
**Proportion wiht CIs for US treatment

tab corrupt_intimidationdummy2 mexicotreatment, ro co chi2
**This shows raw proportions
summarize corrupt_intimidationdummy2 if mexicotreatment==1
**This provides the same proportion information for Mexico treatment only
ttest corrupt_intimidationdummy2 = corrupt_intimidationdummy2 if mexicotreatment==1
*** provides the same proportion information plus confidence intervals for Mex
summarize corrupt_intimidationdummy2 if mexicotreatment==0
**proportion for US treatment
ttest corrupt_intimidationdummy2 = corrupt_intimidationdummy2 if mexicotreatment==0
**Proportion wiht CIs for US treatment

**Figure 6 code--coefficient plot for ologit regressions

ologit corrupt_ff educ income polinterest female globaltravel confidence_elections mexicotreatment c.confidence_elections#mexicotreatment
estimates store c1	

ologit corrupt_money educ income polinterest female globaltravel  confidence_elections mexicotreatment c.confidence_elections#mexicotreatment
estimates store c2
	
ologit corrupt_elections educ income polinterest female globaltravel  confidence_elections mexicotreatment c.confidence_elections#mexicotreatment
estimates store c3	

ologit corrupt_intimidation educ income polinterest female globaltravel  confidence_elections mexicotreatment c.confidence_elections#mexicotreatment
estimates store c4

coefplot (c1, label(Food Favors) msymbol (T))  (c2, label(Campaign Funds) msymbol (X)) (c3, label(Election Law) msymbol (S)) (c4, label (Possible Intimidation) msymbol (C)), nolabel  drop(_cons) xline(0) coeflabel (1. educ="Education" 2. income="Income" 3. polinterest="Interest in Politics" 4. female="Gender(female)" 5. globaltravel="Travel Abroad" 6. confidence_elections="Confidence in Elections" 7. mexicotreatmet= "Mexico Treatment" 7. c.confidence_elections#mexicotreatment= "Confidence in Elections X Mexico Treatment") scheme(s2mono) title("Are These Political Acts Corruption?", span margin(9 6 3 0) size(medlarge)) scale(.85) name(coeffplotpoor, replace)
		
****Figure 7

ologit corrupt_ff educ income polinterest female globaltravel c.confidence_elections i.mexicotreatment c.confidence_elections##i.mexicotreatment
margins mexicotreatment, at(confidence_elections=(1(1)4)) predict (outcome(1))
marginsplot, recastci(rline) scheme(s2mono) xscale(rev)


